// @ts-check
/**
 * @type {import('vitepress').UserConfig}
 */
module.exports = {
// base: "./",
  base: "/so/",
  title: '宋承昊的博客',
  lang: 'zh-CN',
  // base:'/proj/qdpz-docs/',
  description: '一个开箱即用web移动端组件',
  head: createHead(),
  themeConfig: {
    repo: 'echoyuyu',
    docsRepo: 'echoyuyu',
    logo: '/logo.png',
    docsBranch: 'main',
    editLinks: true,
    editLinkText: '为此页提供修改建议',
    nav: createNav(),
    sidebar: createSidebar(),
  },
};

/**
 * @type {()=>import('vitepress').HeadConfig[]}
 */

function createHead() {
  return [
    ['meta', { name: 'author', content: 'Vbenjs Team' }],
    [
      'meta',
      {
        name: 'keywords',
        content: 'vben, vitejs, vite, ant-design-vue, vue',
      },
    ],
    ['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
    [
      'meta',
      {
        name: 'viewport',
        content:
          'width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no',
      },
    ],
    ['meta', { name: 'keywords', content: 'vue vben admin docs' }],
    ['link', { rel: 'icon', href: '/favicon.ico' }],
  ];
}

/**
 * @type {()=>import('./theme-default/config').DefaultTheme.NavItem[]}
 */
function createNav() {
  return [
    {
      text: '生活',
      link: '/guide/introduction'
    },
    {
      text: '技术',
      link: '/components/mapLocus',
    },
    {
      text: '友情链接',
      
      items: [
        {
          text: '友情链接',
          link: '/other/see',
        },
        {
          text: '我的简历',
          link: 'https://echoyuyu.github.io/',
          // https://yu1340022972.github.io/
        },
        {
          text: '项目源码',
          link: 'http://echoyuyu.gitee.io/so',
        },
		{
		  text: '点赞支持',
		  link: 'https://gitee.com/echoyuyu/song/stargazers',
		}
      ],
    },
    {
      text: '赞助',
      link: '/other/donate',
    },
    // {
    //   text: '文献',
    //   items: 
    //   [    

    //     {
	  //       text: '控制',
	  //       link: '/components/cssDiscern',
	  //     },
    //     {
    //       text: '会晤',
    //       link: '/components/chat',
    //     },
    //               {
    //         text: '茫然',
    //         link: '/other/wz1',
    //       },
    //   ],
    // },


  ];
}

function createSidebar() {
  return {
    '/components/': [
      {
        text: 'laravel功能',
        collapsible:true,
        children: [
          {
            text: '发邮件',
            link: '/components/mapLocus',
          },{
            text: 'bootstrap-switch提交表单没值',
            link: '/components/ucharts',
          } ,
          {
            text: '492 每个接口都报错',
            link: '/components/camera',
          },
          // {
          //   text: 'thinkphp基础使用笔记',
          //   link: '/other/wz1',
          // },
          // {
          //   text: 'git不上传文件设置笔记',
          //   link: '/other/wz2',
          // },

          // {
          //   text: '自定义键盘',
          //   link: '/components/keyboard',
          // }
        ],
      },
	  {
	    text: '前端',
      collapsible:true,
	    children: [
        {
          text: 'css不更新',
          link: '/components/wz5',
        },
        {
          text: 'fetch请求',
          link: '/components/wz4',
          },
          {
            text: '原生html使用vue',
            link: '/components/wz3',
          },      
          {
            text: 'vue的scss记录',
            link: '/guide/introduction',
          },
          {
            text: 'vue3 同步await',
            link: '/guide/router',
          },
          
		  // {
		  //   text: '排行榜',
		  //   link: '/components/cssRankingList',
		  // },
		  // {
		  //   text: '登录合集',
		  //   link: '/components/cssLogin',
		  // }
	    ],
	  },
	  {
	    text: '工具报错',
      collapsible:true,
	    children: [
	      {
	        text: '宝塔报错',
	        link: '/components/pay_matting',
	      },
		  {
		    text: '报错12030',
		    link: '/components/pay_poster',
		  }
	    ],
	  },
    ],
    '/': [
      {
        text: '基础',
        collapsible:true,
        children: [
       
          {
            text: '拍照',
            link: '/guide/',
          },
          {
            text: '支付宝黄金卖出规则',
            link: '/guide/settings',
          },
          
          {
            text: '济南今日天气',
            link: '/guide/mock',
          },
          // {
          //   text: '组件使用',
          //   link: '/guide/component',
          // },
          // {
          //   text: '样式',
          //   link: '/guide/design',
          // },
          // {
          //   text: '构建&部署',
          //   link: '/guide/deploy',
          // },
        ],
      }
    ],
  };
}
